﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DPS.Prototype.Model
{
    public class ProdLine:IComparable<ProdLine>,IEquatable<ProdLine>
    {
        public string PlantCode { get; set; }
        public string LineNo { get; set; }
        public string Location { get; set; }
        public List<string> Models { get; set; }

        public List<Capacity> Capacitys { get; set; }

        public ProdLine(string plantCode, string lineNo, string location, List<string> models)
        {
            this.PlantCode = plantCode;
            this.LineNo = lineNo;
            this.Location = location;
            this.Models = models;
            this.Capacitys = new List<Capacity>();
        }

  

        public int CompareTo(ProdLine other)
        {
            return string.Compare(this.LineNo, other.LineNo, StringComparison.CurrentCultureIgnoreCase);
        }

        public bool Equals(ProdLine other)
        {
            return this.CompareTo(other) == 0;
        }
    }
}
